﻿@model App.Models.Sys.SysUserModel
@using App.Common;
@using App.Models.Sys;
@using App.Admin;
@{
    ViewBag.Title = "修改";
    Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
    List<permModel> perm = (List<permModel>)ViewBag.Perm;
    if (perm == null)
    {
        perm = new List<permModel>();
    }
}

<script type="text/javascript">
    $(function () {
        $("#btnSave").click(function () {
            if ($("form").valid()) {
                $.ajax({
                    url: "@Url.Action("Edit")",
                type: "Post",
                data: $("form").serialize(),
                dataType: "json",
                success: function (data) {
                    if (data.type == 1) {
                        window.parent.frameReturnByMes(data.message);
                        window.parent.frameReturnByReload(true);
                        window.parent.frameReturnByClose()
                    }
                    else {
                        window.parent.frameReturnByMes(data.message);
                    }
                }
            });
        }
        return false;
    });
    $("#btnReturn").click(function () {
        window.parent.frameReturnByClose();
    });
});
</script>
<div class="mvctool bgb">
@Html.ToolButton("btnSave", "icon-save", "保存", perm, "Save", true)
@Html.ToolButton("btnReturn", "icon-return", "返回",false)
</div>
@using (Html.BeginForm())
{
             @Html.HiddenFor(model => model.Id)
             @Html.HiddenFor(model => model.CreateTime)
 <table class="fromEditTable setTextWidth300">
    <tbody>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.UserName)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.UserName)
            </td>
            <td>@Html.ValidationMessageFor(model => model.UserName)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Password)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Password)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Password)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.TrueName)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.TrueName)
            </td>
            <td>@Html.ValidationMessageFor(model => model.TrueName)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Card)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Card)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Card)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.MobileNumber)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.MobileNumber)
            </td>
            <td>@Html.ValidationMessageFor(model => model.MobileNumber)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.PhoneNumber)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.PhoneNumber)
            </td>
            <td>@Html.ValidationMessageFor(model => model.PhoneNumber)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.QQ)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.QQ)
            </td>
            <td>@Html.ValidationMessageFor(model => model.QQ)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.EmailAddress)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.EmailAddress)
            </td>
            <td>@Html.ValidationMessageFor(model => model.EmailAddress)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.OtherContact)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.OtherContact)
            </td>
            <td>@Html.ValidationMessageFor(model => model.OtherContact)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Province)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Province)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Province)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.City)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.City)
            </td>
            <td>@Html.ValidationMessageFor(model => model.City)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Village)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Village)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Village)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Address)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Address)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Address)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.State)：
            </td>
            <td style="width:310px">
                @Html.CheckBoxFor(model => model.State)
            </td>
            <td>@Html.ValidationMessageFor(model => model.State)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.CreateTime)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.CreateTime)
            </td>
            <td>@Html.ValidationMessageFor(model => model.CreateTime)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.CreatePerson)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.CreatePerson)
            </td>
            <td>@Html.ValidationMessageFor(model => model.CreatePerson)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Sex)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Sex)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Sex)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Birthday)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Birthday)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Birthday)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.JoinDate)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.JoinDate)
            </td>
            <td>@Html.ValidationMessageFor(model => model.JoinDate)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Marital)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Marital)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Marital)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Political)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Political)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Political)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Nationality)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Nationality)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Nationality)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Native)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Native)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Native)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.School)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.School)
            </td>
            <td>@Html.ValidationMessageFor(model => model.School)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Professional)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Professional)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Professional)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Degree)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Degree)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Degree)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.DepId)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.DepId)
            </td>
            <td>@Html.ValidationMessageFor(model => model.DepId)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.PosId)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.PosId)
            </td>
            <td>@Html.ValidationMessageFor(model => model.PosId)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Expertise)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Expertise)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Expertise)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.JobState)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.JobState)
            </td>
            <td>@Html.ValidationMessageFor(model => model.JobState)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Photo)：
            </td>
            <td style="width:310px">
             @Html.HiddenFor(model => model.Photo)
             <img class="expic" src="@((Model.Photo==null||Model.Photo=="")?"/Content/Images/NotPic.jpg":Model.Photo)" /><br />
             <a href="javascript:$('#FileUpload').trigger('click');" class="files"></a>
             <input type="file"  class="displaynone"  size="10" value="" id="FileUpload" name="FileUpload" onchange="Upload('SingleFile', 'Photo', 'FileUpload','1','1');" />
             <span class="uploading">请稍候...</span>
            </td>
            <td>@Html.ValidationMessageFor(model => model.Photo)</td>
        </tr>
        <tr>
            <td style="width:100px; text-align:right;">
                @Html.LabelFor(model => model.Attach)：
            </td>
            <td style="width:310px">
                @Html.EditorFor(model => model.Attach)
            </td>
            <td>@Html.ValidationMessageFor(model => model.Attach)</td>
        </tr>
    </tbody>
</table>
}
